home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / usr / include / strings.h < prev    next >
C/C++ Source or Header  |  2008-09-29  |  3KB  |  66 lines

  1. /* Copyright (C) 1991,92,96,97,99,2000,2001 Free Software Foundation, Inc.
  2.    This file is part of the GNU C Library.
  3.  
  4.    The GNU C Library is free software; you can redistribute it and/or
  5.    modify it under the terms of the GNU Lesser General Public
  6.    License as published by the Free Software Foundation; either
  7.    version 2.1 of the License, or (at your option) any later version.
  8.  
  9.    The GNU C Library is distributed in the hope that it will be useful,
  10.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  12.    Lesser General Public License for more details.
  13.  
  14.    You should have received a copy of the GNU Lesser General Public
  15.    License along with the GNU C Library; if not, write to the Free
  16.    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  17.    02111-1307 USA.  */
  18.  
  19. #ifndef    _STRINGS_H
  20. #define    _STRINGS_H    1
  21.  
  22. /* We don't need and should not read this file if <string.h> was already
  23.    read. The one exception being that if __USE_BSD isn't defined, then
  24.    these aren't defined in string.h, so we need to define them here.  */
  25. #if !defined _STRING_H || !defined __USE_BSD
  26.  
  27. # include <features.h>
  28. # define __need_size_t
  29. # include <stddef.h>
  30.  
  31. __BEGIN_DECLS
  32.  
  33. /* Compare N bytes of S1 and S2 (same as memcmp).  */
  34. extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
  35.      __THROW __attribute_pure__;
  36.  
  37. /* Copy N bytes of SRC to DEST (like memmove, but args reversed).  */
  38. extern void bcopy (__const void *__src, void *__dest, size_t __n) __THROW;
  39.  
  40. /* Set N bytes of S to 0.  */
  41. extern void bzero (void *__s, size_t __n) __THROW;
  42.  
  43. /* Return the position of the first bit set in I, or 0 if none are set.
  44.    The least-significant bit is position 1, the most-significant 32.  */
  45. extern int ffs (int __i) __THROW __attribute__ ((const));
  46.  
  47. /* Find the first occurrence of C in S (same as strchr).  */
  48. extern char *index (__const char *__s, int __c) __THROW __attribute_pure__;
  49.  
  50. /* Find the last occurrence of C in S (same as strrchr).  */
  51. extern char *rindex (__const char *__s, int __c) __THROW __attribute_pure__;
  52.  
  53. /* Compare S1 and S2, ignoring case.  */
  54. extern int strcasecmp (__const char *__s1, __const char *__s2)
  55.      __THROW __attribute_pure__;
  56.  
  57. /* Compare no more than N chars of S1 and S2, ignoring case.  */
  58. extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
  59.      __THROW __attribute_pure__;
  60.  
  61. __END_DECLS
  62.  
  63. #endif    /* string.h  */
  64.  
  65. #endif    /* strings.h  */
  66.